package com.ruoyi.project.mydy.payrecord.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.payrecord.mapper.DlPayRecordMapper;
import com.ruoyi.project.mydy.payrecord.domain.DlPayRecord;
import com.ruoyi.project.mydy.payrecord.service.IDlPayRecordService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 支付记录Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-07
 */
@Service
public class DlPayRecordServiceImpl implements IDlPayRecordService 
{
    @Autowired
    private DlPayRecordMapper dlPayRecordMapper;

    /**
     * 查询支付记录
     * 
     * @param id 支付记录主键
     * @return 支付记录
     */
    @Override
    public DlPayRecord selectDlPayRecordById(Long id)
    {
        return dlPayRecordMapper.selectDlPayRecordById(id);
    }

    /**
     * 查询支付记录列表
     * 
     * @param dlPayRecord 支付记录
     * @return 支付记录
     */
    @Override
    public List<DlPayRecord> selectDlPayRecordList(DlPayRecord dlPayRecord)
    {
        return dlPayRecordMapper.selectDlPayRecordList(dlPayRecord);
    }

    /**
     * 新增支付记录
     * 
     * @param dlPayRecord 支付记录
     * @return 结果
     */
    @Override
    public int insertDlPayRecord(DlPayRecord dlPayRecord)
    {
        dlPayRecord.setCreateTime(DateUtils.getNowDate());
        return dlPayRecordMapper.insertDlPayRecord(dlPayRecord);
    }

    /**
     * 修改支付记录
     * 
     * @param dlPayRecord 支付记录
     * @return 结果
     */
    @Override
    public int updateDlPayRecord(DlPayRecord dlPayRecord)
    {
        return dlPayRecordMapper.updateDlPayRecord(dlPayRecord);
    }

    /**
     * 批量删除支付记录
     * 
     * @param ids 需要删除的支付记录主键
     * @return 结果
     */
    @Override
    public int deleteDlPayRecordByIds(String ids)
    {
        return dlPayRecordMapper.deleteDlPayRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除支付记录信息
     * 
     * @param id 支付记录主键
     * @return 结果
     */
    @Override
    public int deleteDlPayRecordById(Long id)
    {
        return dlPayRecordMapper.deleteDlPayRecordById(id);
    }
}
